# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.StoragePoolResourceStatus do
  @moduledoc """
  [Output Only] Contains output only fields.

  ## Attributes

  *   `diskCount` (*type:* `String.t`, *default:* `nil`) - [Output Only] Number of disks used.
  *   `lastResizeTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Timestamp of the last successful resize in RFC3339 text format.
  *   `maxTotalProvisionedDiskCapacityGb` (*type:* `String.t`, *default:* `nil`) - [Output Only] Maximum allowed aggregate disk size in gigabytes.
  *   `poolUsedCapacityBytes` (*type:* `String.t`, *default:* `nil`) - [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks.
  *   `poolUsedIops` (*type:* `String.t`, *default:* `nil`) - [Output Only] Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. For more information, see https://cloud.google.com/compute/docs/disks/storage-pools.
  *   `poolUsedThroughput` (*type:* `String.t`, *default:* `nil`) - [Output Only] Sum of all the disks' provisioned throughput in MB/s.
  *   `poolUserWrittenBytes` (*type:* `String.t`, *default:* `nil`) - [Output Only] Amount of data written into the pool, before it is compacted.
  *   `totalProvisionedDiskCapacityGb` (*type:* `String.t`, *default:* `nil`) - [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity.
  *   `totalProvisionedDiskIops` (*type:* `String.t`, *default:* `nil`) - [Output Only] Sum of all the disks' provisioned IOPS.
  *   `totalProvisionedDiskThroughput` (*type:* `String.t`, *default:* `nil`) - [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :diskCount => String.t() | nil,
          :lastResizeTimestamp => String.t() | nil,
          :maxTotalProvisionedDiskCapacityGb => String.t() | nil,
          :poolUsedCapacityBytes => String.t() | nil,
          :poolUsedIops => String.t() | nil,
          :poolUsedThroughput => String.t() | nil,
          :poolUserWrittenBytes => String.t() | nil,
          :totalProvisionedDiskCapacityGb => String.t() | nil,
          :totalProvisionedDiskIops => String.t() | nil,
          :totalProvisionedDiskThroughput => String.t() | nil
        }

  field(:diskCount)
  field(:lastResizeTimestamp)
  field(:maxTotalProvisionedDiskCapacityGb)
  field(:poolUsedCapacityBytes)
  field(:poolUsedIops)
  field(:poolUsedThroughput)
  field(:poolUserWrittenBytes)
  field(:totalProvisionedDiskCapacityGb)
  field(:totalProvisionedDiskIops)
  field(:totalProvisionedDiskThroughput)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.StoragePoolResourceStatus do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.StoragePoolResourceStatus.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.StoragePoolResourceStatus do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
